package br.com.listener;

import java.util.TimerTask;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import br.com.controller.ItemBean;
import br.com.scheduler.Timer;

public class SgliServletContextListener implements ServletContextListener {
	
	TimerTask task = new Timer();
	

	@Override
	public void contextDestroyed(ServletContextEvent context) {
		task.cancel();
		
	}

	@Override
	public void contextInitialized(ServletContextEvent context) {
		task = new Timer();
		java.util.Timer timer = new java.util.Timer();
		timer.schedule(task, 300000);
		
		
		
	}

}
